home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / tls / tls074c.sunsparc.Z / tls074c.sunsparc / lib / vtcl / tests / frame.tcl < prev    next >
Encoding:
Text File  |  1995-07-20  |  1.1 KB  |  55 lines

  1. # CVS $Id: frame.tcl,v 1.3 1995/02/03 16:54:45 zibi Exp $
  2. #
  3. # a test of the frame widget
  4. #
  5.  
  6. proc quitCB {form cbs} {
  7.     VtClose
  8.     exit 0
  9. }
  10.  
  11. proc changeFrameCB {frame type cbs} {
  12.     VtSetValues $frame -shadowType $type -title $type
  13. }
  14.  
  15. proc noTitleCB {frame cbs} {
  16.     VtSetValues $frame -title NONE
  17. }
  18.  
  19. #
  20. # Start Program
  21. #
  22. #
  23. set ap [VtOpen frame]
  24.  
  25. set fn [VtStartForm $ap.form -title "VtFrame" ]
  26.  
  27. set frame [VtFrame $fn.frame \
  28.              -title "ETCHED_IN" \
  29.              -topSide FORM \
  30.              -leftSide FORM \
  31.              -bottomSide FORM ]
  32.                  
  33. # This puts a row column inside the frame to give
  34. # it some width.
  35. set rc1 [VtRowColumn $frame.rc1]
  36. VtLabel $rc1.lab1 -label "                        "
  37.  
  38.  
  39.  
  40. set rc2 [VtRowColumn $fn.rc2 -leftSide NONE -rightSide FORM -topSide FORM]
  41.  
  42. foreach type {IN OUT ETCHED_IN ETCHED_OUT} {
  43.     VtPushButton $rc2.$type -label $type \
  44.                 -callback "changeFrameCB $frame $type" 
  45. }
  46.  
  47. VtPushButton $rc2.none -label "No Title" -callback "noTitleCB $frame"
  48. VtPushButton $rc2.quit -label QUIT -callback "quitCB $fn"
  49.  
  50. VtSetValues $frame -rightSide $rc2 -rightOffset 30
  51.  
  52. VtShow $fn
  53. VtMainLoop
  54.  
  55.